package dome5;

public class Test {
    public static void main(String[] args) {
        Student s1 = new Student("zhangsan",10);
        Student s2 = new Student("lisi",20);
        //根据分数进行比较
        ScoreComparator scoreComparator = new ScoreComparator();
        System.out.println(scoreComparator.compare(s1,s2));

        //根据姓名比较
        NameComparator nameComparator = new NameComparator();
        System.out.println(nameComparator.compare(s1,s2));
    }
}
